#pragma once
#include "../DefinesCore.hpp"
#include <iostream>
CYBERTRON_BEGIN
class logServer
{
public:
	logServer() { };
	virtual ~logServer() {};

	static void Initialize();
	static void logServerSetup(std::string logFilePath);
	static void setLogServerAddress(const char *logServerIp = "logcollector", int logServerPort = 9999);
	static void setLogEnableConsoleAppender();
	static void setLogFilePath(const char *logFilePath = "debug.log");
	static void setLogTaskId(const char *taskId, const char *producer);

	static char* getTaskId() { return mTaskId; }
	static char* getProducer() { return mProducer; }
private:
	static char* mTaskId;
	static char* mProducer;
};

void logOutputDebug(const char* taskId,const char *format, ...);
void logOutputInfo(const char* taskId, const char *format, ...);
void logOutputWarn(const char* taskId, const char *format, ...);
void logOutputError(const char* taskId, const char *format, ...);
void logOutputFatal(const char* taskId, const char *format, ...);
#ifndef __GNUC__
#define logOutputDebug cybertron::logOutputDebug
#define logOutputInfo cybertron::logOutputInfo
#define logOutputWarn cybertron::logOutputWarn
#define logOutputError cybertron::logOutputError
#define logOutputFatal cybertron::logOutputFatal
#endif
CYBERTRON_END
